package com.infore.common.model.entity;

import com.baomidou.mybatisplus.enums.IdType;

import java.util.Date;

import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import com.infore.common.base.BaseModel;

import java.io.Serializable;

import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;

/**
 * <p>
 * 统计任务
 * </p>
 *
 * @author shaolay
 * @since 2022-12-12
 */
@TableName("stat_task")
public class StatTask extends BaseModel<StatTask> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.INPUT)
    private Integer id;
    /**
     * 任务名称
     */
    @TableField("task_name")
    private String taskName;
    /**
     * 任务分组
     */
    @TableField("task_group")
    private String taskGroup;
    /**
     * 公式id
     */
    @TableField("formula_id")
    private Integer formulaId;
    /**
     * 计划类型（0：cron，1：只执行一次）
     */
    @TableField("plan_type")
    private String planType;
    /**
     * 执行时间点（设置时需要大于当前时间）
     */
    @TableField("execute_time")
    private Date executeTime;
    /**
     * cron表达式
     */
    @TableField("cron_expression")
    private String cronExpression;
    /**
     * 备注
     */
    private String remarks;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTaskName() {
        return taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    public String getTaskGroup() {
        return taskGroup;
    }

    public void setTaskGroup(String taskGroup) {
        this.taskGroup = taskGroup;
    }

    public Integer getFormulaId() {
        return formulaId;
    }

    public void setFormulaId(Integer formulaId) {
        this.formulaId = formulaId;
    }

    public String getPlanType() {
        return planType;
    }

    public void setPlanType(String planType) {
        this.planType = planType;
    }

    public Date getExecuteTime() {
        return executeTime;
    }

    public void setExecuteTime(Date executeTime) {
        this.executeTime = executeTime;
    }

    public String getCronExpression() {
        return cronExpression;
    }

    public void setCronExpression(String cronExpression) {
        this.cronExpression = cronExpression;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "StatTask{" + ", id=" + id + ", taskName=" + taskName + ", taskGroup=" + taskGroup + ", formulaId=" + formulaId + ", planType=" + planType + ", executeTime=" + executeTime + ", cronExpression=" + cronExpression + ", remarks=" + remarks + "}";
    }
}
